package com.wabbei.friendcenter.action;

import java.util.HashMap;
import java.util.Map;

import com.webbei.friendcenter.service.MyFriendCenter;
import com.webbei.pojo.Customcomment;

public class GetTheLastCommentByCustomId {
	private MyFriendCenter friservice;
	private int CustomId;
	private Customcomment comment;
	private int sourse;
	private int commentCountbycustomid;
	
	public String execute(){
		System.out.println("rescouse:"+sourse);
		Map<String,Object> m=new HashMap<String,Object>();
		m.put("CustomId",CustomId);
		m.put("Source",sourse);
		comment=friservice.getTheLastCommentByCustomId(m);
		
		commentCountbycustomid=friservice.getComemntCountByCustomId(m);
		System.out.println(comment.toString());
		return "success";
	}
	
	public int getCommentCountbycustomid() {
		return commentCountbycustomid;
	}

	public void setCommentCountbycustomid(int commentCountbycustomid) {
		this.commentCountbycustomid = commentCountbycustomid;
	}

	public void setFriservice(MyFriendCenter friservice) {
		this.friservice = friservice;
	}
	public int getCustomId() {
		return CustomId;
	}
	public void setCustomId(int customId) {
		CustomId = customId;
	}
	public Customcomment getComment() {
		return comment;
	}
	public void setComment(Customcomment comment) {
		this.comment = comment;
	}
	public int getSourse() {
		return sourse;
	}
	public void setSourse(int sourse) {
		this.sourse = sourse;
	}
	
}
